<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>demo1</title>
	<script type="text/javascript">


		// function sum(a){
		// 	num =0;
		// 	for(n=1;n<=a;n++){
		// 		num+=n;
		// 	}
		// 	return num;
		// }
		// name=sum(1000);
		// alert(name);

		function co(b){
			
			if(b==0){
				return 0;
			  
			}
			 return b+co(b-1);
			  
			  
		}


		t=co(1000);
		alert(t);

	</script>
</head>
<body>
	
</body>
</html>